<%@ page import="cn.myschool.entity.Grade" %>
<%@ page import="cn.myschool.service.GradeService" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<%@include file="checkLogin.jsp" %>

<!--主体内容-->
<section class="publicMian ">

    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>学生管理 >> 学生添加</span>
        </div>
        <div class="providerAdd">
            <form action="doSudentAdd.jsp" method="post" enctype="multipart/form-data">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div>
                    <%
                        String msg = (String) request.getAttribute("msg");
                    %>
                    <span style="font-size:40px;color:red;">
                        <%=msg == null ? "" : msg%>
                    </span>
                </div>
                <div>
                    <label for="sname">姓名：</label>
                    <input type="text" name="sname" id="sname" required/>
                    <span>*请输入姓名</span>
                </div>
                <div>
                    <label for="sex">性别：</label>
                    <select name="sex" id="sex">
                        <option value="男">男</option>
                        <option value="女">女</option>
                        <option value="妖">妖</option>
                        <option value="人妖">人妖</option>
                    </select>
                    <span>*请选择性别</span>
                </div>
                <div>
                    <label for="telephone">手机：</label>
                    <input type="number" name="telephone" id="telephone" min="1" required/>
                    <span>*请输入手机</span>
                </div>
                <div>
                    <label for="qq">qq：</label>
                    <input type="number" name="qq" id="qq" min="1" required/>
                    <span>*请输入qq</span>
                </div>
                <div>
                    <label for="wechat">微信：</label>
                    <input type="text" name="wechat" id="wechat" min="1" required/>
                    <span>*请输入微信</span>
                </div>
                <div>
                    <label for="fromcity">来自哪里：</label>
                    <input type="text" name="fromcity" id="fromcity" min="1" required/>
                    <span>*请输入来自哪里</span>
                </div>
                <div>
                    <label for="address">地址：</label>
                    <input type="text" name="address" id="address" min="1" required/>
                    <span>*请输入地址</span>
                </div>
                <div>
                    <label for="pass">密码：</label>
                    <input type="text" name="pass" id="pass" min="1" required/>
                    <span>*请输入密码</span>
                </div>
                <div>
                    <label for="idcardpic">idcardpic：</label>
                    <input type="text" name="idcardpic" id="idcardpic" min="1" required/>
                    <span>*idcardpic</span>
                </div>
                <div>
                    <label for="enterdate">报名时间：</label>
                    <input type="date" name="enterdate" id="enterdate" min="1" required/>
                    <span>*报名时间</span>
                </div>
                <div>
                    <label for="birthday">生日：</label>
                    <input type="date" name="birthday" id="birthday" min="1" required/>
                    <span>*生日</span>
                </div>
                <div>
                    <label>年级：</label>
                    <select name="gradeid">
                        <%
                            List<Grade> grades = GradeService.ME.findALL();
                            for (Grade grade : grades) {
                        %>
                        <option value="<%=grade.getId()%>"><%=grade.getGname()%>
                        </option>
                        <%
                            }
                        %>
                    </select>
                    <span>*请选择年级</span>
                    <div>
                        <label for="photo">身份证照片：</label>
                        <input type="file" name="photo" id="photo" min="1" required/>
                        <span>*身份证照片</span>
                    </div>
                </div>

                <div class="providerAddBtn">
                    <!--<a href="#">保存</a>-->
                    <!--<a href="billList.html">返回</a>-->
                    <input type="submit" value="保存"/>
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>

<script src="js/time.js"></script>

</body>
</html>
